<!--#
 @version 0.2 (auto-set)
#-->

<!-- Table 'pinghosts' edit -->
<p align=center>
 <a href="?">&lt;&lt;&lt; <#LANG_BACK#></a>
</p>
<table border=0 align=center cellpadding=3>
<form action="?" method="post" enctype="multipart/form-data" name="frmEdit">
[#if OK#]
<tr>
 <td colspan=2 align=center>
  <font color="green"><#LANG_DATA_SAVED#></font>
 </td>
</tr>
[#endif OK#]
[#if ERR#]
<tr>
 <td colspan=2 align=center>
  <font color="red"><#LANG_FILLOUT_REQURED#></font>
 </td>
</tr>
[#endif ERR#]
[#if ID=""#]
<tr>
 <td colspan=2 align=center><b><#LANG_NEW_RECORD#></b></td>
</tr>
[#endif ID#]

<tr>
 <td align=right>
 [#if ERR_TITLE#]<b><font color="red">[#endif#]
 <#LANG_TITLE#>:
 </td>
 <td>
  <input type="text" name="title" value="[#TITLE#]" size="50">
 </td>
</tr>


<!-- HOSTNAME (varchar) -->
<tr>
 <td align=right>
 <#LANG_ID#>:
 </td>
 <td>
  [#UDID#]
 </td>
</tr>



<!-- ONLINE_INTERVAL (int) -->
<tr>
 <td align=right>
 [#if ERR_ONLINE_INTERVAL#]<b><font color="red">[#endif#]
 <#LANG_CHECK_INTERVAL#>:
 </td>
 <td>
  <input type="text" name="online_interval" value="[#ONLINE_INTERVAL#]" size="10"> <#LANG_SECONDS#>
 </td>
</tr>

[#if PROPERTIES#]

<script language="javascript">
 function setProperty(prop_id, current_value) {
  var new_value=prompt("Please enter new value", current_value);
  if (new_value!=null) {
   var url="?id=<#ID#>&edit_mode=<#EDIT_MODE#>&view_mode=<#VIEW_MODE#>&mode=setvalue";
   window.location=url+'&prop_id='+prop_id+"&new_value="+new_value;
  }
  return false;
 }
</script>

<tr>
 <td valign="top" align="right"><b><#LANG_PROPERTIES#>:</b></td>
 <td valign="top">
  <table width="100%" border="1" cellpadding="2">
   <tr>
    <td valign="top"><b><#LANG_TITLE#></b></td>
    <td valign="top"><b><#LANG_VALUE#></b></td>
    <td valign="top">&nbsp;</td>
    <td valign="top"><b><#LANG_UPDATED#></b></td>
    <td valign="top"><b><#LANG_LINKED_OBJECT#></b></td>
    <td valign="top"><b><#LANG_LINKED_PROPERTY#></b></td>
    <td valign="top"><b><#LANG_STARRED#></b></td>
   </tr>
   [#begin PROPERTIES#]
   <tr>
    <td valign="top">[#SYSNAME#]</td>
    <td valign="top">[#VALUE#]&nbsp;</td>
    <td valign="top"><a href="#" onClick="return setProperty('[#ID#]', '[#VALUE#]')"><#LANG_SET#></a></td>
    <td valign="top">[#UPDATED#]</td>
    <td valign="top"><input type="text" name="linked_object[#ID#]" value="[#LINKED_OBJECT#]"></td>
    <td valign="top"><input type="text" name="linked_property[#ID#]" value="[#LINKED_PROPERTY#]"></td>
    <td valign="top"><input type="checkbox" name="starred[#ID#]" value="1"[#if STARRED="1"#] checked[#endif#]></td>
   </tr>
   [#end PROPERTIES#]
  </table>
 </td>
</tr>
[#endif PROPERTIES#]

<!-- SCRIPT_ID_ONLINE (int) -->
<tr>
 <td align=right valign="top">
 [#if ERR_SCRIPT_ID#]<b><font color="red">[#endif#]
 <#LANG_ONCHANGE_ACTION#>:
 </td>
 <td>

 <input type="radio" name="run_type" value="script"[#if SCRIPT_ID!="0"#] checked[#endif#]> <#LANG_ONCHANGE_SCRIPT#>:
   <select name="script_id">
    <option value="0">
    [#begin SCRIPTS#]
        <option value="[#ID#]"[#if ID="<#SCRIPT_ID#>"#] selected[#endif#]>[#TITLE#]
        [#end SCRIPTS#]
   </select>    
   <br>
   <input type="radio" name="run_type" value="code"[#if SCRIPT_ID="0"#] checked[#endif#]> <#LANG_ONCHANGE_SCRIPT#>:<br>
 [#if ERRORS!=""#]
 <font color='red'>[#ERRORS#]</font><br>
 [#endif ERRORS#]   
 <textarea name="code" rows=4 cols=100 class="field span8">[#CODE#]</textarea>

 </td>
</tr>

<tr>
 <td valign="top">&nbsp;</td>
 <td>
 [#if ID!=""#]
 <input type="submit" name="subm" value="<#LANG_SUBMIT#>">
 [#else ID#]
 <input type="submit" name="subm" value="<#LANG_ADD#>">
 [#endif ID#]
 &nbsp;
 <a href="?"><#LANG_CANCEL#></a>
 </td>
</tr>
<input type="hidden" name="id" value="<#ID#>">
<input type="hidden" name="view_mode" value="<#VIEW_MODE#>">
<input type="hidden" name="edit_mode" value="<#EDIT_MODE#>">
<input type="hidden" name="mode" value="update">
</form>
<tr>
 <td valign="top" colspan="2"><hr></td>
</tr>
<tr>
 <td align=right valign="top">
  <#LANG_LOG#>:
 </td>
 <td valign="top">
  [#LOG#]
 </td>
</tr>

</table>
